<style src="./index.scss" lang="scss" scoped rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
    export default {
        mixins: [Vue.prototype.$vFN.Mixins.Base],

        components: {
            TuwenListCheckFilterBox: async () => Vue.extend(await Vue.prototype.$vFN.Components.Base
                .TuwenListCheckFilterBox())
        },
        data() {
            return {
                // 外部传入
                appWindow: null,
                // 最大上传数量
                count: -1,


                boxVisible: false,


                // 模式类型 支持wx微信，默认为空正常模式
                mode: ""
            };
        },
        methods: {


            // 选择完成
            submit() {
                let _obj = this.$refs.tuwenListCheckFilterBoxRef.getObj();
                if (_obj.obj.length > 0) {
                    let _d = {
                        all: _obj,
                        data: _obj.url,
                    };
                    this.onSuccess(_d);
                } else {
                    this.onCancel();
                }
                this.editBoxClose();
            },
            // 成功回调
            onSuccess() {},
            // 取消回调
            onCancel() {},
            // 失败回调
            onError() {},
            // 关闭窗口
            editBoxClose() {
                this.boxVisible = false;
            },
            // 取消
            editBoxCancel() {
                this.editBoxClose();
                this.onCancel();
            },

            // 初始化
            async init() {
                this.boxVisible = true;

            },
        },
        watch: {},
        mounted() {
            this.init();
        },
        beforeCreate() {},
    };
</script>